package cn.zn.dept.entity;

import cn.zn.base.bean.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;
import java.util.List;

/**
 * 部门表 sys_dept
 *
 * @author zn-admin
 */
@TableName("sys_dept")
public class SysDept extends BaseEntity<SysDept> {

    private String code; // 组织编号

    private String name; // 组织名

    private String shortName; // 组织简称

    private String parentId; // 上级组织

    private String parentCode; // 上级组织

    private String parentName; // 上级组织

    private String corpId; // 产业

    private String corp; // 产业

    private String fzrCode; // 部门负责人

    private String fzrName; // 部门负责人

    private String fgCode; // 分管领导

    private String fgName; // 分管领导

    private String bzflag; // 组织类型：z组织；b部门

    private String status; // 状态（y正常 n停用）

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date ts; // nc更新时间

    /**
     * 子部门
     */
    @TableField(exist = false)
    private List<SysDept> children;

    @TableField(exist = false)
    private Integer childTotal;

    @TableField(exist = false)
    private Boolean leaf;

    @TableField(exist = false)
    private String label;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getShortName() {
        return shortName;
    }

    public void setShortName(String shortName) {
        this.shortName = shortName;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getParentCode() {
        return parentCode;
    }

    public void setParentCode(String parentCode) {
        this.parentCode = parentCode;
    }

    public String getParentName() {
        return parentName;
    }

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    public String getCorpId() {
        return corpId;
    }

    public void setCorpId(String corpId) {
        this.corpId = corpId;
    }

    public String getCorp() {
        return corp;
    }

    public void setCorp(String corp) {
        this.corp = corp;
    }

    public String getFzrCode() {
        return fzrCode;
    }

    public void setFzrCode(String fzrCode) {
        this.fzrCode = fzrCode;
    }

    public String getFzrName() {
        return fzrName;
    }

    public void setFzrName(String fzrName) {
        this.fzrName = fzrName;
    }

    public String getFgCode() {
        return fgCode;
    }

    public void setFgCode(String fgCode) {
        this.fgCode = fgCode;
    }

    public String getFgName() {
        return fgName;
    }

    public void setFgName(String fgName) {
        this.fgName = fgName;
    }

    public String getBzflag() {
        return bzflag;
    }

    public void setBzflag(String bzflag) {
        this.bzflag = bzflag;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Date getTs() {
        return ts;
    }

    public void setTs(Date ts) {
        this.ts = ts;
    }

    public List<SysDept> getChildren() {
        return children;
    }

    public void setChildren(List<SysDept> children) {
        this.children = children;
    }

    public Boolean getLeaf() {
        return leaf;
    }

    public void setLeaf(Boolean leaf) {
        this.leaf = leaf;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public Integer getChildTotal() {
        return childTotal;
    }

    public void setChildTotal(Integer childTotal) {
        this.childTotal = childTotal;
    }
}
